<%-- 
    Document   : Database_Setup
    Created on : Nov 25, 2009, 2:02:29 PM
    Author     : 50920709
    Function   : only for the connection of DB
--%>

<%-- library --%>
<%@ page import="java.sql.*"%>

<%-- Declaration --%>
<%!
    String user = "root";
    String password = "nbuser";
    String database = "websudoku";
    String url = "jdbc:mysql://144.214.121.25:3306/" + database+"?useUnicode=true&characterEncoding=utf-8";
    Connection con;
    Statement stmt;
%>

<%-- Expression --%>
<%
    try{
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        con = DriverManager.getConnection(url, user, password);
        stmt = con.createStatement();
        //checking connection successful
        //out.println("Connect Successful" + "<br>");
    }catch(SQLException sqle){
        out.println("SQL Exception : " + sqle);
    }
%>
